// 引入封装好的  get和 post
import http from './index'

/* ==========菜单管理========== */
//封装菜单管理列表
export const getMenuList = ()=>http.get('/menulist?istree=1')
//菜单添加
export const addMenu = (data:any)=>http.post('/menuadd',data)
//菜单编辑
export const menuEdit = (data:any)=>http.post('/menuedit',data)
//菜单删除
export const menuDelete = (data:any)=>http.post('/menudelete',data)
//菜单一条数据查询
export const menuInfo = (data:any)=>http.get('/menuinfo',data)


//角色添加
export const getaddrole = (data:any) =>http.post('/roleadd',data)
//角色列表
export const getrolelist = ()=>http.get('/rolelist')
//角色编辑
export const getroleedit = (data:any)=>http.post('/roleedit',data)
//角色删除
export const getroledelete = (data:any)=>http.post('/roledelete',data)
//获取一条数据角色
export const getroleinfo = (data:any)=>http.get('/roleinfo',data)


//管理员添加
export const getuseradd = (data:any)=>http.post('/useradd',data)
//管理员列表
export const getuserlist = (data:any)=>http.get('/userlist',data)
//管理员总数
export const getusercount = ()=>http.get('/usercount')
//管理员删除
export const getuserdelete = (data:any)=>http.post('/userdelete',data)
//管理员修改
export const getuseredit = (data:any)=>http.post('/useredit',data)
//管理员获取一条数据
export const getuserinfo = (data:any)=>http.get('/userinfo',data)

//登录接口
export const getuserlogin =(data:any)=>http.post('/userlogin',data)